from random import uniform
NUMTEST = 100
for test in range(1,NUMTEST+1):
	cantNodos = test
	print cantNodos,(cantNodos*(cantNodos-1))/2
	for u in range(1,cantNodos+1):
		for v in range(u+1,cantNodos+1):
			print u,v,int(uniform(0,100))
print 0
		

	
